#include "ParticleSystemManager.h"
#include "ParticleGroup.h"
#include <list>


ParticleSystemManager::ParticleSystemManager(void)
{
	this->particleGroups = std::list<ParticleGroup*>();
}

void ParticleSystemManager::AddParticleGroup(ParticleGroup* group){
	group->SetupTextures();
	this->particleGroups.push_back(group);
}


void ParticleSystemManager::Step(float dt){
	// Update

	// Save the old RT and DS buffer views    
	//ID3D11RenderTargetView* oldRTViews[1] = { NULL };    
	//ID3D11DepthStencilView* oldDSView = NULL;    
	//Globals::Context->OMGetRenderTargets(1, oldRTViews, &oldDSView);
	// Get the default renderTarget
	//Globals::Context->OMGetRenderTargets(1, &renderTargetView, &depthStencilView);
	/*ParticleGroup* p ;

	for( std::list<ParticleGroup*>::iterator itr = particleGroups.begin();
		itr != particleGroups.end(); itr++){
			
		p = (ParticleGroup*)*itr;
		p->Update(dt);
	}
	*/
	// Reset the render target back to the original back buffer and not the render to texture anymore.
	//Globals::Context->OMSetRenderTargets(1, &renderTargetView, &depthStencilView);
	//Globals::Context->OMSetRenderTargets(1, oldRTViews, oldDSView);  

	// Draw particles


}

